package cn.intospring.demoapp.ws.demo;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

import cn.intospring.demoapp.ws.demo.dto.UserDTO;
import cn.intospring.demoapp.ws.FaultException;


/**
 * WebService接口定义类.
 * 
 * 使用@WebService将接口中的所有方法输出为Web Service.
 * 可用annotation对设置方法、参数和返回值在WSDL中的定义.
 * 
 * @author sky
 * @author calvin
 */
@WebService(name = "UserService")
public interface UserWebService {
	/**
	 * 根据用户ID获得用户账号.
	 */
	@WebResult(name = "user")
	public UserDTO getUser(@WebParam(name = "userId")
	Integer userId) throws FaultException;

	/**
	 * 插入User.
	 * 
	 * @return 新增对象的ID
	 */
	@WebResult(name = "userId")
	public Integer createUser(@WebParam(name = "user")
	UserDTO user) throws FaultException;
}

